/* 购物车页面布局 */
.cart-page {
    margin-top: 60px;
    padding: 20px 0;
    min-height: calc(100vh - 60px);
    background: #f5f5f5;
}

/* 购物车内容 */
.cart-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 购物车头部 */
.cart-header {
    display: grid;
    grid-template-columns: 60px 3fr 1fr 1fr 1fr 80px;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
}

/* 复选框样式 */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 购物车商品列表 */
.cart-item {
    display: grid;
    grid-template-columns: 60px 3fr 1fr 1fr 1fr 80px;
    align-items: center;
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
}

.product-info {
    display: flex;
    gap: 15px;
}

.product-img {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.product-spec {
    color: #666;
    font-size: 14px;
}

.price {
    color: #ff6b6b;
    font-weight: bold;
}

/* 数量控制 */
.quantity {
    display: flex;
    align-items: center;
    width: 120px;
}

.quantity button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
}

.quantity button:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.quantity input {
    width: 50px;
    height: 28px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    text-align: center;
}

/* 小计和操作 */
.total {
    color: #ff6b6b;
    font-weight: bold;
}

.btn-remove {
    padding: 6px;
    border: none;
    background: none;
    color: #999;
    cursor: pointer;
}

.btn-remove:hover {
    color: #ff6b6b;
}

/* 购物车底部 */
.cart-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.cart-summary {
    margin-right: 20px;
}

.selected-count {
    display: inline-block;
    margin-right: 20px;
}

.total-price {
    display: inline-block;
    font-size: 18px;
}

.total-price span {
    color: #ff6b6b;
    font-weight: bold;
}

.btn-checkout {
    padding: 10px 30px;
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.btn-checkout:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 空购物车 */
.empty-cart {
    text-align: center;
    padding: 60px 0;
    background: #fff;
    border-radius: 8px;
}

.empty-cart i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart p {
    color: #666;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cart-header {
        display: none;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .product-info {
        grid-column: 1 / -1;
    }

    .price, .quantity, .total {
        justify-self: end;
    }

    .action {
        position: absolute;
        top: 10px;
        right: 10px;
    }
} 